package cn.school.web;

import java.util.ArrayList;
import java.util.List;

/**
 * @author oldliu
 * @since 1.0
 */
public class ForList {
    public static void main(String[] args) {
        List<String> list=new ArrayList<>();
        for(int i=1;i<=4;i++){
            new Thread(){
                @Override
                public void run() {
                     for(int j=1;j<=1000;j++){
                         list.add("str-"+j);
                     }
                    System.out.println(list.size());
                }
            }.start();
        }
    }
}
